Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing /
Chapter 2 - Core Printing Features / Core Printing Features Reference
Functions / Printing With QuickDraw GX


GXStartJob

You can use the GXStartJob function to initiate printing when a user wants to print a document.

void GXStartJob (gxJob aJob, StringPtr docName, long pageCount);
aJob
A reference to the job object of the print job to print.
docName
The name of the document to print.
pageCount
The number of pages to print.
DESCRIPTION
You use the GXStartJob function to begin printing a document. In the aJob parameter, you specify the job object associated with the document to print. In the docName parameter, you specify the name of the user's document. You can set this parameter to nil to use the default document name.

In the pageCount parameter, you specify the total number of pages the user chose to print or pass 0 if the page count is unknown. You can call the GXGetJobPageRange function to obtain the page range. In response to the GXStartJob call, QuickDraw GX displays the current page and the print job's page count, if it is known, in the Status dialog box.

SPECIAL CONSIDERATIONS
Immediately after you call the GXStartJob function, you should check for errors by calling the GXGetJobError function. Only if no errors are returned should you call the GXFinishJob function.

RESULT CODES
gxPrUserAbortErrThe user has canceled printing.
gxSegmentLoadFailedErrA required code segment could not be found, or there was not enough memory to load it.
SEE ALSO
Listing 2-5 on page 2-21 and Listing 2-6 on page 2-23 show how to use the GXStartJob function to begin printing a document.

For information about the GXGetJobPageRange function, see the previous section.

The GXGetJobError function is described on page 2-52. The GXFinishJob function is described on page 2-65.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help